package top.qitun.tian.api;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import top.qitun.bizz.client.client.entity.ClientBO;
import top.qitun.bizz.user.tuser.entity.TUserBO;
import top.qitun.model.response.ObjectDataResponse;
import top.qitun.model.security.AuthenticationDTO;
import top.qitun.tian.modal.reqeust.ClientRegisterRequest;

@FeignClient(name="account-ms")
public interface ClientServiceAPI {
	
	@RequestMapping(value = "/v1/login", method = RequestMethod.POST)
	ObjectDataResponse<ClientBO> clientlogin(@RequestBody AuthenticationDTO authenticationDTO);

	@RequestMapping(value = "/v1/client", method = RequestMethod.POST)
	ObjectDataResponse<ClientBO> register(@RequestBody ClientRegisterRequest registerRequest);

	@RequestMapping(value = "/v1/user/m/{mobile}", method = RequestMethod.GET)
	ObjectDataResponse<TUserBO> queryByMobile(@PathVariable("mobile") String mobile);
}
